<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<!--新建三包服务页面-->
<head>
<title>首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div id="content">
		<section class="content-header">
			<h1>
				<i class="fa  fa-cogs"></i> <strong>有偿服务单</strong>
			</h1>
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-home "></i>Home</a></li>
				<li>售后管理</li>
				<li class="active">有偿服务单</li>
			</ol>
		</section>
		<!-- Main content -->
		<section class="content">

			<div class="nav-tabs-custom">
				<ul class="nav nav-tabs" id="myTabs">
					<li class="active"><a href="#tab_1" data-toggle="tab">售后服务单</a></li>
					<li><a href="#tab_2" data-toggle="tab">售后服务反馈</a></li>
					<li><a href="#tab_3" data-toggle="tab">三包填写/审批人员选择</a></li>
					<li><a href="#tab_4" data-toggle="tab">跟踪情况录入</a></li>
				</ul>
			</div>
			<div class="tab-content">
				<div class="tab-pane active" id="tab_1">
					<form id="tab1Form" class="widget-box">
						<div class="box-body">
							<div class="box-header with-border">
								<i class="fa fa-th-list"></i> <input class="form-control hide"
									id="ticketId" name="ticketId" th:value="${afterSaleTicket.id}" />
								<h4 class="box-title">基本信息</h4>
							</div>
							<table class="table table-bordered">
								<tbody>
									<tr class="odd gradeX">
										<td width="10%" class="center">单位名称</td>
										<td colspan="1">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="unitName"
													name="unitName" disabled="disabled"
													th:value="${afterSaleTicket.unitName}" />
											</div>
										</td>
										<td colspan="2"></td>
									</tr>
									<tr class="even gradeC">
										<td width="10%" class="center">合同号</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" name="contractCode"
													id="contractCode"
													th:value="${afterSaleTicket.contractCode}"
													disabled="disabled" />
											</div>
										</td>
										<td width="10%" class="center">申请人</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" name="proposer" id="proposer"
													th:value="${afterSaleTicket.proposer}" disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="odd gradeC">
										<td width="10%" class="center">现场联系人</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="linkMan"
													name="linkMan" th:value="${afterSaleTicket.linkMan}"
													disabled="disabled" />
											</div>
										</td>
										<td width="10%" class="center">联系方式</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="linkManPhone"
													name="linkManPhone"
													th:value="${afterSaleTicket.linkManPhone}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="odd gradeC">
										<td width="10%" class="center">售后类型</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="afterSaleType"
													name="afterSaleType" value="无偿三包" readonly="readonly" />
											</div>
										</td>
										<td width="10%" class="center">设备编号</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" name="deviceCode"
													id="deviceCode" th:value="${afterSaleTicket.deviceCode}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="odd gradeC">
										<td width="10%" class="center">设备名称</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="deviceName"
													name="deviceName" th:value="${afterSaleTicket.deviceName}"
													disabled="disabled" />
											</div>
										</td>
										<td width="10%" class="center">设备型号</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="deviceNumber"
													name="deviceNumber"
													th:value="${afterSaleTicket.deviceNumber}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="even gradeC">
										<td width="10%" class="center">问题描述</td>
										<td colspan="3">
											<div class="col-sm-12">
												<textarea class="form-control" style="width: 100%"
													id="questionDetail" name="questionDetail" rows="3"
													th:text="${afterSaleTicket.questionDetail}"
													disabled="disabled"></textarea>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
							<table class="table table-bordered">
								<tr class="odd gradeX">
									<td width="10%" class="center">管理代码</td>
									<td width="40%">
										<div class="col-sm-12">
											<input class="form-control " type="text" id="manageCode"
												name="manageCode" th:value="${afterSaleTicket.manageCode}"
												disabled="disabled" />
										</div>
									</td>
									<td colspan="3"></td>

								</tr>
								<tr class="even gradeC">
									<td width="10%" class="center">处理方案</td>
									<td colspan="3">
										<div class="col-sm-12">
											<textarea class="form-control" style="width: 100%"
												id="dealPlan" name="dealPlan" rows="3"
												th:text="${afterSaleTicket.dealPlan}" disabled="disabled"></textarea>
										</div>
									</td>
								</tr>
								<tr class="even gradeC">
									<td width="10%" class="center">派遣说明</td>
									<td colspan="3">
										<div class="col-sm-12">
											<textarea class="form-control" style="width: 100%"
												id="sendReason" name="sendReason" rows="3"
												th:text="${sendReason}" disabled="disabled"></textarea>
										</div>
									</td>
								</tr>
								<tr class="odd gradeX">
									<td width="10%" class="center">经办人</td>
									<td width="40%">
										<div class="col-sm-12">
											<input class="form-control " type="text" id="operator"
												name="operator" th:value="${afterSaleTicket.operator}"
												disabled="disabled" />
										</div>
									</td>
									<td width="10%" class="center">办理进度</td>
									<td width="40%">
										<div class="col-sm-12">
											<input class="form-control " type="text" id="dealRate"
												name="dealRate" th:value="${afterSaleTicket.dealRate}"
												disabled="disabled" />
										</div>
									</td>

								</tr>
								<tr class="odd gradeX">
									<td width="10%" class="center">发货时间</td>
									<td width="40%">
										<div class="col-sm-12">
											<input class="hide" type="text" id="sendDate1"
												name="sendDate1" th:value="${afterSaleTicket.sendDate}" />
											<input class="form-control" type="text" id="sendDate"
												name="sendDate" disabled="disabled" />
										</div>
									</td>
									<td width="10%" class="center">是否到达现场</td>
									<td width="40%">
										<div class="col-sm-12">
											<input class="hide" id="isArrive1" name="isArrive1"
												th:value="${afterSaleTicket.isArrive}" /> <input
												class="form-control" type="text" id="isArrive"
												name="isArrive" disabled="disabled" />
										</div>
									</td>

								</tr>
								<tr class="odd gradeX">
									<td width="10%" class="center">运单号</td>
									<td width="40%">
										<div class="col-sm-12">
											<input class="form-control" type="text" id="waybillNum"
												name="waybillNum" th:value="${afterSaleTicket.waybillNum}" />
										</div>
									</td>
									<td colspan="2"></td>
								</tr>
							</table>
							<div class="box-header with-border">
								<i class="fa fa-th-list"></i>
								<h4 class="box-title">附件</h4>
							</div>
							<table class="table table-bordered">
								<tr class="odd gradeX">
									<td width="10%" class="center">传真，邮件</td>
									<td width="20%">
										<button type="button" class="btn btn-info upMail">上传</button>
										<button type="button" class="btn btn-info downMail">下载</button>
										<span id="mailNum" class="badge label-pill label-primary">0</span>
									</td>
									<td width="10%" class="center">质量反馈表</td>
									<td width="20%">
										<button type="button" class="btn btn-info upQuality">上传</button>
										<button type="button" class="btn btn-info downQuality">下载</button>
										<span id="qualityNum" class="badge label-pill label-primary">0</span>
									</td>
									<td width="10%" class="center">三包办理明细</td>
									<td width="20%">
										<button type="button" class="btn btn-info upDetail">上传</button>
										<button type="button" class="btn btn-info downDetail">下载</button>
										<span id="detailNum" class="badge label-pill label-primary">0</span>
									</td>
								</tr>
								<tr class="odd gradeX">
									<td width="10%" class="center">执行过程</td>
									<td width="20%">
										<button type="button" class="btn btn-info upProcess">上传</button>
										<button type="button" class="btn btn-info downProcess">下载</button>
										<span id="processNum" class="badge label-pill label-primary">0</span>
									</td>
									<td width="10%" class="center">其他</td>
									<td width="20%">
										<button type="button" class="btn btn-info upOther">上传</button>
										<button type="button" class="btn btn-info downOther">下载</button>
										<span id="otherNum" class="badge label-pill label-primary">0</span>
									</td>
									<td width="10%" class="center">三包图片</td>
									<td width="20%">
										<button type="button" class="btn btn-info upPicture">上传</button>
										<button type="button" class="btn btn-info downPicture">下载</button>
										<span id="pictureNum" class="badge label-pill label-primary">0</span>
									</td>

								</tr>
							</table>
							<div class="modal-footer">
								<button type="button" class="btn btn-info saveNum">保存</button>
								<a type="button" class="btn btn-primary pull-right"
									href="javascript:history.go(-1)">返回</a>

							</div>
						</div>
					</form>
				</div>
				<div class="tab-pane" id="tab_2">
					<table class="table table-bordered">
						<tbody>
							<tr class="even gradeC">
								<td width="10%" class="center">质量记录编号</td>
								<td width="40%"><input class="hide" readonly="readonly"
									th:value="${afterSaleTicketBack.id}" />
									<div class="col-sm-12">
										<input class="form-control" type="text" readonly="readonly"
											th:value="${afterSaleTicketBack.recordCode}" />
									</div></td>
								<td width="10%" class="center">产品状态</td>
								<td width="40%">
									<div class="col-sm-12">
										<input class="form-control" type="text" readonly="readonly"
											th:value="${afterSaleTicketBack.deviceState}" />
									</div>
								</td>
							</tr>
							<tr class="odd gradeC">
								<td width="10%" class="center">是否过保质期</td>
								<td width="40%">
									<div class="col-sm-12">
										<input class="form-control"
											th:value="${afterSaleTicketBack.isGuarantee}"
											readonly="readonly" />
									</div>
								</td>
								<td width="10%" class="center">责任归属</td>
								<td width="40%">
									<div class="col-sm-12">
										<input class="form-control" type="text" readonly="readonly"
											th:value="${afterSaleTicketBack.dutyBlong}" />
									</div>
								</td>
							</tr>
							<tr class="even gradeC">
								<td width="10%" class="center">现场问题描述</td>
								<td colspan="3">
									<div class="col-sm-12">
										<textarea class="form-control" style="width: 100%"
											readonly="readonly" rows="3"
											th:text="${afterSaleTicketBack.questionDescription}"></textarea>
									</div>
								</td>
							</tr>
							<tr class="even gradeC">
								<td width="10%" class="center">事故原因分析</td>
								<td colspan="3">
									<div class="col-sm-12">
										<textarea class="form-control" style="width: 100%"
											readonly="readonly" rows="3"
											th:text="${afterSaleTicketBack.reasonAnalyse}"></textarea>
									</div>
								</td>
							</tr>
							<tr class="even gradeC">
								<td width="10%" class="center">解决及整改方案</td>
								<td colspan="3">
									<div class="col-sm-12">
										<textarea class="form-control" style="width: 100%"
											readonly="readonly" rows="3"
											th:text="${afterSaleTicketBack.solvePlan}"></textarea>
									</div>
								</td>
							</tr>
							<tr class="even gradeC">
								<td width="10%" class="center">备注</td>
								<td colspan="3">
									<div class="col-sm-12">
										<textarea class="form-control" style="width: 100%"
											readonly="readonly" rows="3"
											th:text="${afterSaleTicketBack.memo}"></textarea>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="tab-pane" id="tab_3">
					<form id="tab1Form" class="widget-box">
						<div class="box-body">
							<table class="table table-bordered">
								<tbody>
									<tr class="even gradeC">
										<td width="20%" class="center">三包编号</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="regulationCode"
													name="regulationCode"
													th:value="${afterSaleTicketAdvice.regulationCode}"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">出厂编号</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="outCode"
													name="outCode" th:value="${afterSaleTicketAdvice.outCode}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="even gradeX">
										<td width="20%" class="center">用户单位</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="unitName"
													name="unitName" th:value="${afterSaleTicket.unitName}"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">合同号</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="contractCode"
													name="contractCode"
													th:value="${afterSaleTicket.contractCode}"
													disabled="disabled" />
											</div>
										</td>

									</tr>
									<tr class="even gradeC">
										<td width="20%" class="center">交货期</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="hide" type="text" id="deliveryDate1"
													name="deliveryDate1"
													th:value="${afterSaleTicketAdvice.deliveryDate}" /> <input
													class="form-control" type="text" id="deliveryDate"
													name="deliveryDate" disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">产品型号</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="deviceNumber"
													name="deviceNumber"
													th:value="${afterSaleTicket.deviceNumber}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="even gradeX">

										<td width="20%" class="center">发运日期</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="hide" type="text" id="sendDateThree1"
													name="sendDateThree1"
													th:value="${afterSaleTicketAdvice.sendDate}"
													disabled="disabled" /> <input class="form-control"
													type="text" id="sendDateThree" name="sendDateThree"
													disabled="disabled" />
											</div>
										</td>
									</tr>
								</tbody>
							</table>
							<table class="table table-bordered">
								<tbody>
									<tr class="odd gradeX">
										<td width="10%" align="center" style="vertical-align: middle">责任归属</td>
										<td width="90%">
											<div class="col-sm-8">
												<div class="col-md-6">
													<input class="hide" type="text" id="dutyBlongThree1"
														name="dutyBlongThree1"
														th:value="${afterSaleTicketAdvice.dutyBlong}" /> <input
														class="radioIterm" type="radio" name="dutyBlongThree"
														id="dutyBlongThree" value="1" checked="checked"
														disabled="disabled" />全新设计产品
												</div>
												<div class="col-md-6">
													<input class="radioIterm" type="radio"
														name="dutyBlongThree" id="dutyBlongThree" value="2"
														disabled="disabled" />新工艺方法
												</div>
											</div>
										</td>
									</tr>
									<tr class="odd gradeX">
										<td width="10%" align="center" style="vertical-align: middle">外购</td>
										<td width="90%">
											<div class="col-sm-12">
												<div class="col-md-3">
													<input class="hide" type="text" id="outsourcing1"
														name="outsourcing1"
														th:value="${afterSaleTicketAdvice.outsourcing}" /> <input
														class="radioIterm" type="radio" id="outsourcing"
														name="outsourcing" value="1" checked="checked"
														disabled="disabled" />质保期内
												</div>
												<div class="col-md-5">
													<input class="radioIterm" type="radio" name="outsourcing"
														id="outsourcing" value="2" disabled="disabled" />质保期内现场损坏、遗失用户不认
												</div>
												<div class="col-md-3">
													<input class="radioIterm" type="radio" name="outsourcing"
														id="outsourcing" value="3" disabled="disabled" />质保期外考虑市场因素
												</div>
											</div>
										</td>
									</tr>
									<tr class="odd gradeX">
										<td width="10%" align="center" style="vertical-align: middle">自制</td>
										<td width="90%">
											<div class="col-sm-12">
												<div class="col-md-3">
													<input class="hide" type="text" id="selfMake1"
														name="selfMake1"
														th:value="${afterSaleTicketAdvice.selfMake}" /> <input
														class="radioIterm" type="radio" id="selfMake"
														name="selfMake" value="1" checked="checked"
														disabled="disabled" />质保期内质保期内①设计②总装③焊接④运输⑤涂装⑥加工
												</div>
												<div class="col-md-5">
													<input class="radioIterm" type="radio" name="selfMake"
														id="selfMake" value="2" disabled="disabled" />质保期内现场损失用户不认
												</div>
												<div class="col-md-3">
													<input class="radioIterm" type="radio" name="selfMake"
														id="selfMake" value="3" disabled="disabled" />质保期外考虑市场因素
												</div>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
							<table class="table table-bordered">
								<tbody>
									<tr class="even gradeC">
										<td width="20%" class="center">赔偿原因</td>
										<td colspan="3">
											<div class="col-sm-12">
												<textarea class="form-control" style="width: 100%"
													id="payReason" name="payReason" rows="3"
													th:text="${afterSaleTicketAdvice.sendWay}"
													disabled="disabled"></textarea>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
							<div class="box-header with-border">
								<i class="fa fa-th-list"></i>
								<h4 class="box-title">赔偿情况（零件名称、图号、数量）</h4>

							</div>
							<div class="box-body">
								<table id="payDeviceTable"
									class="mytable dataTable table-bordered text-center table-striped table-hover"
									cellspacing="0" width="100%">
									<thead>
										<tr>
											<th>序号</th>
											<th>零件名称</th>
											<th>图号</th>
											<th>数量</th>
											<th>材质</th>
											<th>单价</th>
											<th>总价</th>
											<th>备注</th>
										</tr>
									</thead>
									<tbody>

									</tbody>


								</table>

							</div>
							<table class="table table-bordered">
								<tbody>
									<tr class="even gradeC">
										<td width="20%" class="center">合计</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="summation"
													name="summation"
													th:value="${afterSaleTicketAdvice.summation}"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">财务处核价人</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="financePerson"
													name="financePerson"
													th:value="${afterSaleTicketAdvice.financePerson}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="even gradeX">
										<td width="10%" class="center">日期</td>
										<td width="40%">
											<div class="col-sm-12">
												<input class="hide" type="text" id="dealDate1"
													name="dealDate1"
													th:value="${afterSaleTicketAdvice.dealDate}"
													disabled="disabled" /> <input class="form-control"
													type="text" id="dealDate" name="dealDate"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">赔偿发运方式</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="sendWay"
													name="sendWay" th:value="${afterSaleTicketAdvice.sendWay}"
													disabled="disabled" />
											</div>
										</td>

									</tr>
									<tr class="even gradeC">
										<td width="20%" class="center">发往地点</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="sendPlace"
													name="sendPlace"
													th:value="${afterSaleTicketAdvice.sendPlace}"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">收货单位名称</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="receiveUnit"
													name="receiveUnit"
													th:value="${afterSaleTicketAdvice.receiveUnit}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="even gradeC">
										<td width="20%" class="center">联系人</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="contactPerson"
													name="contactPerson"
													th:value="${afterSaleTicketAdvice.contactPerson}"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">电话</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="contactPhone"
													datatype="*,*1-100,t" name="contactPhone"
													th:value="${afterSaleTicketAdvice.contactPhone}"
													disabled="disabled" />
											</div>
										</td>
									</tr>
									<tr class="even gradeC">
										<td width="20%" class="center">邮编</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="postNumber"
													name="postNumber"
													th:value="${afterSaleTicketAdvice.postNumber}"
													disabled="disabled" />
											</div>
										</td>
										<td width="20%" class="center">办理部门</td>
										<td width="30%">
											<div class="col-sm-12">
												<input class="form-control" type="text" id="dealSuperior"
													name="dealSuperior"
													th:value="${afterSaleTicketAdvice.dealSuperior}"
													disabled="disabled" />
											</div>
										</td>
									</tr>

								</tbody>
							</table>

						</div>
					</form>
				</div>
				<div class="tab-pane" id="tab_4">
					<div class="box box-body">
						<form id="activeTypeForm">
							<table class="table table-bordered">
								<tbody>

									<tr class="even gradeC">
										<td width="10%" class="center">活动类型</td>
										<td width="40%"><input class="hide"
											th:value="${afterSaleTicketBack.id}" /> <input class="hide"
											id="userId" th:value="${userId}" /> <input class="hide"
											id="outServiceId" th:value="${outServiceId}" />
											<div class="col-sm-12">
												<input class="form-control" type="text" id="activeType"
													name="activeType" dataType="*" />
											</div></td>
										<td class="center" colspan="2"></td>
									</tr>
									<tr class="even gradeC">
										<td width="10%" class="center">说明</td>
										<td colspan="3">
											<div class="col-sm-12">
												<textarea class="form-control" style="width: 100%" rows="3"
													id="tranceMemo" name="tranceMemo" dataType="*"></textarea>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
							<div class="modal-footer">
								<a type="button" class="btn btn-primary pull-right delete-btn">删除跟踪活动</a>
								<a type="button" class="btn btn-primary pull-right tranceSave">保存跟踪活动</a>
							</div>
						</form>
					</div>
					<div class="box-header with-border">
						<i class="fa fa-th-list"></i>
						<h4 class="box-title">售后活动列表</h4>
					</div>
					<div class="box box-body">
						<table width="100%" id="ticketTranceTable"
							class="mytable dataTable table-bordered text-center table-striped table-hover ">
							<thead>
								<tr>
									<th width="6%">序号</th>
									<th width="6%"><input type="checkbox" id="checkAll" /></th>
									<th width="10%">类型</th>
									<th width="10%">时间</th>
									<th width="68%">说明</th>
								</tr>
							</thead>
							<tbody>

							</tbody>
						</table>
						<div class="modal-footer">
							<a type="button" class="btn btn-primary pull-right"
								href="javascript:history.go(-1)">返回</a>
						</div>
					</div>
				</div>
			</div>
			<div></div>
		</section>
		<script th:src="@{/afterSaleOutHouse/outHouseTrance.js}"></script>
		<script th:src="@{/afterSaleTicket/detail.js}"></script>
		<script type="text/javascript">
			jQuery(function() {
				$('#myTabs a:first').tab('show');
			});
		</script>
	</div>

</body>
</html>